package leetcode.L500;

public class EX190 {
    public int reverseBits(int n) {
        int res = 0;

        for (int i = 0; i < 32&&n!=0; i++) {
            res |= n&1<<(32-i);
            n=n>>1;
        }
        return res;
    }
}
